<form action = "" method = "post" class = "filter-date">
	<span style = 'margin:0 5px 0 0'>Date</span>
	<label for="dsfm_from"></label>
	<input type="text" id="dsfm_from" name="dsfm_from" value = "{$dsfm_from}" class = "input"/>
	<label for="dsfm_to">-</label>
	<input type="text" id="dsfm_to" name="dsfm_to" value = "{$dsfm_to}" class = "input"/>
	<input type = "submit" value = "filter">
</form>

<script>
$(function() {
	$( "#dsfm_from" ).datepicker({
		changeMonth: true,
		dateFormat: "yy-mm-dd",
		onSelect: function( selectedDate ) {
			$( "#dsfm_to" ).datepicker( "option", "minDate", selectedDate );
		}
	});
	$( "#dsfm_to" ).datepicker({
		changeMonth: true,
		dateFormat: "yy-mm-dd",
		onSelect: function( selectedDate ) {
			$( "#dsfm_from" ).datepicker( "option", "maxDate", selectedDate );
		}
	});
});
</script>